<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Class template private_adaptive_pool</title>
<link rel="stylesheet" href="../../../../doc/src/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
<link rel="home" href="../../index.html" title="The Boost C++ Libraries BoostBook Documentation Subset">
<link rel="up" href="../../boost_container_header_reference.html#doxygen.boost_container_header_reference.adaptive__pool_8hpp" title="Header &lt;boost/container/adaptive_pool.hpp&gt;">
<link rel="prev" href="structboost_1_1container_1_1adaptive__pool_1_1rebind.html" title="Struct template rebind">
<link rel="next" href="structboost_1_1container_1_1private__adaptive__pool_1_1rebind.html" title="Struct template rebind">
<meta name="viewport" content="width=device-width, initial-scale=1">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../boost.png"></td>
<td align="center"><a href="../../../../index.html">Home</a></td>
<td align="center"><a href="../../../../libs/libraries.htm">Libraries</a></td>
<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
<td align="center"><a href="../../../../more/index.htm">More</a></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="structboost_1_1container_1_1adaptive__pool_1_1rebind.html"><img src="../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../../boost_container_header_reference.html#doxygen.boost_container_header_reference.adaptive__pool_8hpp"><img src="../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="structboost_1_1container_1_1private__adaptive__pool_1_1rebind.html"><img src="../../../../doc/src/images/next.png" alt="Next"></a>
</div>
<div class="refentry">
<a name="doxygen.boost_container_header_reference.classboost_1_1container_1_1private__adaptive__pool"></a><div class="titlepage"></div>
<div class="refnamediv">
<h2><span class="refentrytitle">Class template private_adaptive_pool</span></h2>
<p>boost::container::private_adaptive_pool</p>
</div>
<h2 class="refsynopsisdiv-title">Synopsis</h2>
<div class="refsynopsisdiv"><pre class="synopsis"><span class="comment">// In header: &lt;<a class="link" href="../../boost_container_header_reference.html#doxygen.boost_container_header_reference.adaptive__pool_8hpp" title="Header &lt;boost/container/adaptive_pool.hpp&gt;">boost/container/adaptive_pool.hpp</a>&gt;

</span><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> T<span class="special">,</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">size_t</span> NodesPerBlock <span class="special">=</span> <span class="identifier">ADP_nodes_per_block</span><span class="special">,</span> 
         <span class="identifier">std</span><span class="special">::</span><span class="identifier">size_t</span> MaxFreeBlocks <span class="special">=</span> <span class="identifier">ADP_max_free_blocks</span><span class="special">,</span> 
         <span class="identifier">std</span><span class="special">::</span><span class="identifier">size_t</span> OverheadPercent <span class="special">=</span> <span class="identifier">ADP_overhead_percent</span><span class="special">,</span> 
         <span class="keyword">unsigned</span> Version <span class="special">=</span> <span class="number">2</span><span class="special">&gt;</span> 
<span class="keyword">class</span> <a class="link" href="classboost_1_1container_1_1private__adaptive__pool.html" title="Class template private_adaptive_pool">private_adaptive_pool</a> <span class="special">{</span>
<span class="keyword">public</span><span class="special">:</span>
  <span class="comment">// <a class="link" href="classboost_1_1container_1_1private__adaptive__pool.html#doxygen.boost_container_header_reference.classboost_1_1container_1_1private__adaptive__pooltypes">types</a></span>
  <span class="keyword">typedef</span> <span class="keyword">unsigned</span> <span class="keyword">int</span>                                                                                                           <a class="link" href="classboost_1_1container_1_1private__adaptive__pool.html#doxygen.boost_container_header_reference.classboost_1_1container_1_1private__adaptive__pool_1ac775b180ca34b77f6c80e7e192b27ef1"><span class="identifier">allocation_type</span></a><span class="special">;</span>
  <span class="keyword">typedef</span> <span class="identifier">private_adaptive_pool</span><span class="special">&lt;</span> <span class="identifier">T</span><span class="special">,</span> <span class="identifier">NodesPerBlock</span><span class="special">,</span> <span class="identifier">MaxFreeBlocks</span><span class="special">,</span> <span class="identifier">OverheadPercent</span> <span class="identifier">BOOST_CONTAINER_DOCIGN</span><span class="special">(</span><span class="identifier">BOOST_MOVE_I</span> <span class="identifier">Version</span><span class="special">)</span> <span class="special">&gt;</span> <a name="doxygen.boost_container_header_reference.classboost_1_1container_1_1private__adaptive__pool_1abd33eee57c83ba53341dad60be24967c"></a><span class="identifier">self_t</span><span class="special">;</span>         
  <span class="keyword">typedef</span> <span class="identifier">dtl</span><span class="special">::</span><span class="identifier">private_adaptive_node_pool</span><span class="special">&lt;</span> <span class="keyword">sizeof</span><span class="special">(</span><span class="identifier">T</span><span class="special">)</span><span class="special">,</span> <span class="identifier">NodesPerBlock</span><span class="special">,</span> <span class="identifier">MaxFreeBlocks</span><span class="special">,</span> <span class="identifier">OverheadPercent</span> <span class="special">&gt;</span>                            <a name="doxygen.boost_container_header_reference.classboost_1_1container_1_1private__adaptive__pool_1a7c6f46a26295e7acd210ef27ff53abfb"></a><span class="identifier">pool_t</span><span class="special">;</span>         
  <span class="keyword">typedef</span> <span class="identifier">T</span>                                                                                                                      <a name="doxygen.boost_container_header_reference.classboost_1_1container_1_1private__adaptive__pool_1af1cb87e97803985f9df666153d9de334"></a><span class="identifier">value_type</span><span class="special">;</span>     
  <span class="keyword">typedef</span> <span class="identifier">T</span> <span class="special">*</span>                                                                                                                    <a name="doxygen.boost_container_header_reference.classboost_1_1container_1_1private__adaptive__pool_1a51bf6f8a7c561094155bcc49c811cc3e"></a><span class="identifier">pointer</span><span class="special">;</span>        
  <span class="keyword">typedef</span> <span class="keyword">const</span> <span class="identifier">T</span> <span class="special">*</span>                                                                                                              <a name="doxygen.boost_container_header_reference.classboost_1_1container_1_1private__adaptive__pool_1acaf95db9b605a8b2344be36e619cae19"></a><span class="identifier">const_pointer</span><span class="special">;</span>  
  <span class="keyword">typedef</span> <span class="special">::</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">container</span><span class="special">::</span><span class="identifier">dtl</span><span class="special">::</span><span class="identifier">unvoid_ref</span><span class="special">&lt;</span> <span class="identifier">T</span> <span class="special">&gt;</span><span class="special">::</span><span class="identifier">type</span>                                                                         <a name="doxygen.boost_container_header_reference.classboost_1_1container_1_1private__adaptive__pool_1a95d8b6f3ca909a73559c090b56a8d93f"></a><span class="identifier">reference</span><span class="special">;</span>      
  <span class="keyword">typedef</span> <span class="special">::</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">container</span><span class="special">::</span><span class="identifier">dtl</span><span class="special">::</span><span class="identifier">unvoid_ref</span><span class="special">&lt;</span> <span class="identifier">constT</span> <span class="special">&gt;</span><span class="special">::</span><span class="identifier">type</span>                                                                    <a name="doxygen.boost_container_header_reference.classboost_1_1container_1_1private__adaptive__pool_1a740cc55385db65d71154aada05459cc7"></a><span class="identifier">const_reference</span><span class="special">;</span>
  <span class="keyword">typedef</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">size_t</span>                                                                                                            <a name="doxygen.boost_container_header_reference.classboost_1_1container_1_1private__adaptive__pool_1a24be80339aa877d1f6df5137b83bb6d2"></a><span class="identifier">size_type</span><span class="special">;</span>      
  <span class="keyword">typedef</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">ptrdiff_t</span>                                                                                                         <a name="doxygen.boost_container_header_reference.classboost_1_1container_1_1private__adaptive__pool_1a3e6c7bada574042f454592eec371885f"></a><span class="identifier">difference_type</span><span class="special">;</span>
  <span class="keyword">typedef</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">container</span><span class="special">::</span><span class="identifier">dtl</span><span class="special">::</span><span class="identifier">version_type</span><span class="special">&lt;</span> <span class="identifier">self_t</span><span class="special">,</span> <span class="identifier">Version</span> <span class="special">&gt;</span>                                                                 <a name="doxygen.boost_container_header_reference.classboost_1_1container_1_1private__adaptive__pool_1aaae5f17813fedaeadf8365885057deaa"></a><span class="identifier">version</span><span class="special">;</span>        

  <span class="comment">// member classes/structs/unions</span>
  <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> T2<span class="special">&gt;</span> 
  <span class="keyword">struct</span> <a class="link" href="structboost_1_1container_1_1private__adaptive__pool_1_1rebind.html" title="Struct template rebind">rebind</a> <span class="special">{</span>
    <span class="comment">// types</span>
    <span class="keyword">typedef</span> <span class="identifier">private_adaptive_pool</span><span class="special">&lt;</span> <span class="identifier">T2</span><span class="special">,</span> <span class="identifier">NodesPerBlock</span><span class="special">,</span> <span class="identifier">MaxFreeBlocks</span><span class="special">,</span> <span class="identifier">OverheadPercent</span> <span class="identifier">BOOST_CONTAINER_DOCIGN</span><span class="special">(</span><span class="identifier">BOOST_MOVE_I</span> <span class="identifier">Version</span><span class="special">)</span> <span class="special">&gt;</span> <a class="link" href="structboost_1_1container_1_1private__adaptive__pool_1_1rebind.html#doxygen.boost_container_header_reference.structboost_1_1container_1_1private__adaptive__pool_1_1rebind_1a115aa7948a152c2755f787451f7e9392"><span class="identifier">other</span></a><span class="special">;</span>
  <span class="special">}</span><span class="special">;</span>

  <span class="comment">// <a class="link" href="classboost_1_1container_1_1private__adaptive__pool.html#id5-bb">public member functions</a></span>
   <a class="link" href="classboost_1_1container_1_1private__adaptive__pool.html#doxygen.boost_container_header_reference.classboost_1_1container_1_1private__adaptive__pool_1ae2f6f67a15be5eee651bafd5006cef6b"><span class="identifier">BOOST_CONTAINER_DOCIGN</span></a><span class="special">(</span><span class="identifier">BOOST_CONTAINER_STATIC_ASSERT</span><span class="special">(</span><span class="special">(</span><span class="identifier">Version</span><span class="special">&lt;=</span><span class="number">2</span><span class="special">)</span><span class="special">)</span><span class="special">)</span><span class="special">;</span>
  <a class="link" href="classboost_1_1container_1_1private__adaptive__pool.html#doxygen.boost_container_header_reference.classboost_1_1container_1_1private__adaptive__pool_1aeefc87e0c88be2fc3a30b84878f2ff72"><span class="identifier">private_adaptive_pool</span></a><span class="special">(</span><span class="special">)</span> <span class="keyword">noexcept</span><span class="special">;</span>
  <a class="link" href="classboost_1_1container_1_1private__adaptive__pool.html#doxygen.boost_container_header_reference.classboost_1_1container_1_1private__adaptive__pool_1a2257f8073aa9dee00682fd9567ebda67"><span class="identifier">private_adaptive_pool</span></a><span class="special">(</span><span class="keyword">const</span> <span class="identifier">private_adaptive_pool</span> <span class="special">&amp;</span><span class="special">)</span> <span class="keyword">noexcept</span><span class="special">;</span>
  <span class="identifier">private_adaptive_pool</span> <span class="special">&amp;</span> <a class="link" href="classboost_1_1container_1_1private__adaptive__pool.html#doxygen.boost_container_header_reference.classboost_1_1container_1_1private__adaptive__pool_1aa6b674415b8f7a8b7b052b6f2f7e4603"><span class="keyword">operator</span><span class="special">=</span></a><span class="special">(</span><span class="keyword">const</span> <span class="identifier">private_adaptive_pool</span> <span class="special">&amp;</span><span class="special">)</span> <span class="keyword">noexcept</span><span class="special">;</span>
  <span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> T2<span class="special">&gt;</span> 
    <a class="link" href="classboost_1_1container_1_1private__adaptive__pool.html#doxygen.boost_container_header_reference.classboost_1_1container_1_1private__adaptive__pool_1a6723426cd37f901a7ee2551836e3522a"><span class="identifier">private_adaptive_pool</span></a><span class="special">(</span><span class="keyword">const</span> <span class="identifier">private_adaptive_pool</span><span class="special">&lt;</span> <span class="identifier">T2</span><span class="special">,</span> <span class="identifier">NodesPerBlock</span><span class="special">,</span> <span class="identifier">MaxFreeBlocks</span><span class="special">,</span> <span class="identifier">OverheadPercent</span> <span class="identifier">BOOST_CONTAINER_DOCIGN</span><span class="special">(</span><span class="identifier">BOOST_MOVE_I</span> <span class="identifier">Version</span><span class="special">)</span> <span class="special">&gt;</span> <span class="special">&amp;</span><span class="special">)</span> <span class="keyword">noexcept</span><span class="special">;</span>
  <a class="link" href="classboost_1_1container_1_1private__adaptive__pool.html#doxygen.boost_container_header_reference.classboost_1_1container_1_1private__adaptive__pool_1ae558bc4e8e236a7c4da132a0769c2bc4"><span class="special">~</span><span class="identifier">private_adaptive_pool</span></a><span class="special">(</span><span class="special">)</span> <span class="keyword">noexcept</span><span class="special">;</span>
  <span class="identifier">size_type</span> <a class="link" href="classboost_1_1container_1_1private__adaptive__pool.html#doxygen.boost_container_header_reference.classboost_1_1container_1_1private__adaptive__pool_1a011ad574177edff8f82cfbdf92f5d485"><span class="identifier">max_size</span></a><span class="special">(</span><span class="special">)</span> <span class="keyword">const</span> <span class="keyword">noexcept</span><span class="special">;</span>
  <span class="identifier">pointer</span> <a class="link" href="classboost_1_1container_1_1private__adaptive__pool.html#doxygen.boost_container_header_reference.classboost_1_1container_1_1private__adaptive__pool_1a645acf270eb9b9a9b570ead900925ca5"><span class="identifier">allocate</span></a><span class="special">(</span><span class="identifier">size_type</span><span class="special">,</span> <span class="keyword">const</span> <span class="keyword">void</span> <span class="special">*</span> <span class="special">=</span> <span class="number">0</span><span class="special">)</span><span class="special">;</span>
  <span class="keyword">void</span> <a class="link" href="classboost_1_1container_1_1private__adaptive__pool.html#doxygen.boost_container_header_reference.classboost_1_1container_1_1private__adaptive__pool_1aef249b33c5f820ce7df82bca042de3d5"><span class="identifier">deallocate</span></a><span class="special">(</span><span class="keyword">const</span> <span class="identifier">pointer</span> <span class="special">&amp;</span><span class="special">,</span> <span class="identifier">size_type</span><span class="special">)</span> <span class="keyword">noexcept</span><span class="special">;</span>
  <span class="identifier">pointer</span> <a class="link" href="classboost_1_1container_1_1private__adaptive__pool.html#doxygen.boost_container_header_reference.classboost_1_1container_1_1private__adaptive__pool_1ab01e1ccf20b16f39061ffb952274fc16"><span class="identifier">allocation_command</span></a><span class="special">(</span><span class="identifier">allocation_type</span><span class="special">,</span> <span class="identifier">size_type</span><span class="special">,</span> <span class="identifier">size_type</span> <span class="special">&amp;</span><span class="special">,</span> 
                             <span class="identifier">pointer</span> <span class="special">&amp;</span><span class="special">)</span><span class="special">;</span>
  <span class="identifier">size_type</span> <a class="link" href="classboost_1_1container_1_1private__adaptive__pool.html#doxygen.boost_container_header_reference.classboost_1_1container_1_1private__adaptive__pool_1a8c0d63fced73164ffe28aec9b9f235a0"><span class="identifier">size</span></a><span class="special">(</span><span class="identifier">pointer</span><span class="special">)</span> <span class="keyword">const</span> <span class="keyword">noexcept</span><span class="special">;</span>
  <span class="identifier">pointer</span> <a class="link" href="classboost_1_1container_1_1private__adaptive__pool.html#doxygen.boost_container_header_reference.classboost_1_1container_1_1private__adaptive__pool_1ac2fdc87d0a04244edaa07bb81b9136ac"><span class="identifier">allocate_one</span></a><span class="special">(</span><span class="special">)</span><span class="special">;</span>
  <span class="keyword">void</span> <a class="link" href="classboost_1_1container_1_1private__adaptive__pool.html#doxygen.boost_container_header_reference.classboost_1_1container_1_1private__adaptive__pool_1a9a0fde27d6415c3b1311ceb4905da79a"><span class="identifier">allocate_individual</span></a><span class="special">(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">size_t</span><span class="special">,</span> <span class="identifier">multiallocation_chain</span> <span class="special">&amp;</span><span class="special">)</span><span class="special">;</span>
  <span class="keyword">void</span> <a class="link" href="classboost_1_1container_1_1private__adaptive__pool.html#doxygen.boost_container_header_reference.classboost_1_1container_1_1private__adaptive__pool_1ab8c4ae6844d2b3e1d900e8777341d8af"><span class="identifier">deallocate_one</span></a><span class="special">(</span><span class="identifier">pointer</span><span class="special">)</span> <span class="keyword">noexcept</span><span class="special">;</span>
  <span class="keyword">void</span> <a class="link" href="classboost_1_1container_1_1private__adaptive__pool.html#doxygen.boost_container_header_reference.classboost_1_1container_1_1private__adaptive__pool_1a1e5dfb87b63b30d182f36d891d45e1ba"><span class="identifier">deallocate_individual</span></a><span class="special">(</span><span class="identifier">multiallocation_chain</span> <span class="special">&amp;</span><span class="special">)</span> <span class="keyword">noexcept</span><span class="special">;</span>
  <span class="keyword">void</span> <a class="link" href="classboost_1_1container_1_1private__adaptive__pool.html#doxygen.boost_container_header_reference.classboost_1_1container_1_1private__adaptive__pool_1a2e6ea9fa7139b589ea8592fd75da5ae9"><span class="identifier">allocate_many</span></a><span class="special">(</span><span class="identifier">size_type</span><span class="special">,</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">size_t</span><span class="special">,</span> <span class="identifier">multiallocation_chain</span> <span class="special">&amp;</span><span class="special">)</span><span class="special">;</span>
  <span class="keyword">void</span> <a class="link" href="classboost_1_1container_1_1private__adaptive__pool.html#doxygen.boost_container_header_reference.classboost_1_1container_1_1private__adaptive__pool_1ac5ff2a85d2580af4f96670b705074964"><span class="identifier">allocate_many</span></a><span class="special">(</span><span class="keyword">const</span> <span class="identifier">size_type</span> <span class="special">*</span><span class="special">,</span> <span class="identifier">size_type</span><span class="special">,</span> <span class="identifier">multiallocation_chain</span> <span class="special">&amp;</span><span class="special">)</span><span class="special">;</span>
  <span class="keyword">void</span> <a class="link" href="classboost_1_1container_1_1private__adaptive__pool.html#doxygen.boost_container_header_reference.classboost_1_1container_1_1private__adaptive__pool_1a555d0a39f4fe7b7bf795c508de65deb4"><span class="identifier">deallocate_many</span></a><span class="special">(</span><span class="identifier">multiallocation_chain</span> <span class="special">&amp;</span><span class="special">)</span> <span class="keyword">noexcept</span><span class="special">;</span>
  <span class="keyword">void</span> <a class="link" href="classboost_1_1container_1_1private__adaptive__pool.html#doxygen.boost_container_header_reference.classboost_1_1container_1_1private__adaptive__pool_1a2a4f5d4403607f2a1c6ac8b2e26f3197"><span class="identifier">deallocate_free_blocks</span></a><span class="special">(</span><span class="special">)</span> <span class="keyword">noexcept</span><span class="special">;</span>

  <span class="comment">// <a class="link" href="classboost_1_1container_1_1private__adaptive__pool.html#id6-bb">friend functions</a></span>
  <span class="keyword">void</span> <a class="link" href="classboost_1_1container_1_1private__adaptive__pool.html#doxygen.boost_container_header_reference.classboost_1_1container_1_1private__adaptive__pool_1a9215face6877fc76816c8b3c3d3b3012"><span class="identifier">swap</span></a><span class="special">(</span><span class="identifier">private_adaptive_pool</span> <span class="special">&amp;</span><span class="special">,</span> <span class="identifier">private_adaptive_pool</span> <span class="special">&amp;</span><span class="special">)</span> <span class="keyword">noexcept</span><span class="special">;</span>
  <span class="keyword">bool</span> <a class="link" href="classboost_1_1container_1_1private__adaptive__pool.html#doxygen.boost_container_header_reference.classboost_1_1container_1_1private__adaptive__pool_1a1fa5c3a4c8f566fb23394ac36c09bd2c"><span class="keyword">operator</span><span class="special">==</span></a><span class="special">(</span><span class="keyword">const</span> <span class="identifier">private_adaptive_pool</span> <span class="special">&amp;</span><span class="special">,</span> 
                  <span class="keyword">const</span> <span class="identifier">private_adaptive_pool</span> <span class="special">&amp;</span><span class="special">)</span> <span class="keyword">noexcept</span><span class="special">;</span>
  <span class="keyword">bool</span> <a class="link" href="classboost_1_1container_1_1private__adaptive__pool.html#doxygen.boost_container_header_reference.classboost_1_1container_1_1private__adaptive__pool_1a00729c5c2d8f92aca68ec7c994f9298b"><span class="keyword">operator</span><span class="special">!=</span></a><span class="special">(</span><span class="keyword">const</span> <span class="identifier">private_adaptive_pool</span> <span class="special">&amp;</span><span class="special">,</span> 
                  <span class="keyword">const</span> <span class="identifier">private_adaptive_pool</span> <span class="special">&amp;</span><span class="special">)</span> <span class="keyword">noexcept</span><span class="special">;</span>

  <span class="comment">// <a class="link" href="classboost_1_1container_1_1private__adaptive__pool.html#id7-bb">private member functions</a></span>
  <span class="identifier">pointer</span> <a class="link" href="classboost_1_1container_1_1private__adaptive__pool.html#doxygen.boost_container_header_reference.classboost_1_1container_1_1private__adaptive__pool_1afdcb1f05fce0d213f8604649537f6000"><span class="identifier">priv_allocation_command</span></a><span class="special">(</span><span class="identifier">allocation_type</span><span class="special">,</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">size_t</span><span class="special">,</span> <span class="identifier">size_type</span> <span class="special">&amp;</span><span class="special">,</span> 
                                  <span class="identifier">pointer</span> <span class="special">&amp;</span><span class="special">)</span><span class="special">;</span>

  <span class="comment">// public data members</span>
  <span class="identifier">BOOST_STATIC_CONSTEXPR</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">size_t</span> <span class="identifier">nodes_per_block</span><span class="special">;</span>
  <span class="identifier">BOOST_STATIC_CONSTEXPR</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">size_t</span> <span class="identifier">max_free_blocks</span><span class="special">;</span>
  <span class="identifier">BOOST_STATIC_CONSTEXPR</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">size_t</span> <span class="identifier">overhead_percent</span><span class="special">;</span>
  <span class="identifier">BOOST_STATIC_CONSTEXPR</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">size_t</span> <span class="identifier">real_nodes_per_block</span><span class="special">;</span>
  <span class="identifier">pool_t</span> <span class="identifier">m_pool</span><span class="special">;</span>
<span class="special">}</span><span class="special">;</span></pre></div>
<div class="refsect1">
<a name="id-1.3.8.14.2.4.4"></a><h2>Description</h2>
<div class="refsect2">
<a name="id-1.3.8.14.2.4.4.2"></a><h3>
<a name="doxygen.boost_container_header_reference.classboost_1_1container_1_1private__adaptive__pooltypes"></a><code class="computeroutput">private_adaptive_pool</code> 
        public
       types</h3>
<div class="orderedlist"><ol class="orderedlist" type="1"><li class="listitem">
<p>
<span class="keyword">typedef</span> <span class="keyword">unsigned</span> <span class="keyword">int</span> <a name="doxygen.boost_container_header_reference.classboost_1_1container_1_1private__adaptive__pool_1ac775b180ca34b77f6c80e7e192b27ef1"></a><span class="identifier">allocation_type</span><span class="special">;</span></p>
<p>If Version is 1, the allocator is a STL conforming allocator. If Version is 2, the allocator offers advanced expand in place and burst allocation capabilities. </p>
</li></ol></div>
</div>
<div class="refsect2">
<a name="id-1.3.8.14.2.4.4.3"></a><h3>
<a name="id5-bb"></a><code class="computeroutput">private_adaptive_pool</code> public member functions</h3>
<div class="orderedlist"><ol class="orderedlist" type="1">
<li class="listitem"><pre class="literallayout"> <a name="doxygen.boost_container_header_reference.classboost_1_1container_1_1private__adaptive__pool_1ae2f6f67a15be5eee651bafd5006cef6b"></a><span class="identifier">BOOST_CONTAINER_DOCIGN</span><span class="special">(</span><span class="identifier">BOOST_CONTAINER_STATIC_ASSERT</span><span class="special">(</span><span class="special">(</span><span class="identifier">Version</span><span class="special">&lt;=</span><span class="number">2</span><span class="special">)</span><span class="special">)</span><span class="special">)</span><span class="special">;</span></pre></li>
<li class="listitem">
<pre class="literallayout"><a name="doxygen.boost_container_header_reference.classboost_1_1container_1_1private__adaptive__pool_1aeefc87e0c88be2fc3a30b84878f2ff72"></a><span class="identifier">private_adaptive_pool</span><span class="special">(</span><span class="special">)</span> <span class="keyword">noexcept</span><span class="special">;</span></pre>Default constructor. </li>
<li class="listitem">
<pre class="literallayout"><a name="doxygen.boost_container_header_reference.classboost_1_1container_1_1private__adaptive__pool_1a2257f8073aa9dee00682fd9567ebda67"></a><span class="identifier">private_adaptive_pool</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">private_adaptive_pool</span> <span class="special">&amp;</span><span class="special">)</span> <span class="keyword">noexcept</span><span class="special">;</span></pre>Copy constructor from other private_adaptive_pool. </li>
<li class="listitem">
<pre class="literallayout"><span class="identifier">private_adaptive_pool</span> <span class="special">&amp;</span> <a name="doxygen.boost_container_header_reference.classboost_1_1container_1_1private__adaptive__pool_1aa6b674415b8f7a8b7b052b6f2f7e4603"></a><span class="keyword">operator</span><span class="special">=</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">private_adaptive_pool</span> <span class="special">&amp;</span><span class="special">)</span> <span class="keyword">noexcept</span><span class="special">;</span></pre>Copy assignment from other <a class="link" href="classboost_1_1container_1_1adaptive__pool.html" title="Class template adaptive_pool">adaptive_pool</a>. </li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">template</span><span class="special">&lt;</span><span class="keyword">typename</span> T2<span class="special">&gt;</span> 
  <a name="doxygen.boost_container_header_reference.classboost_1_1container_1_1private__adaptive__pool_1a6723426cd37f901a7ee2551836e3522a"></a><span class="identifier">private_adaptive_pool</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">private_adaptive_pool</span><span class="special">&lt;</span> <span class="identifier">T2</span><span class="special">,</span> <span class="identifier">NodesPerBlock</span><span class="special">,</span> <span class="identifier">MaxFreeBlocks</span><span class="special">,</span> <span class="identifier">OverheadPercent</span> <span class="identifier">BOOST_CONTAINER_DOCIGN</span><span class="special">(</span><span class="identifier">BOOST_MOVE_I</span> <span class="identifier">Version</span><span class="special">)</span> <span class="special">&gt;</span> <span class="special">&amp;</span><span class="special">)</span> <span class="keyword">noexcept</span><span class="special">;</span></pre>Copy constructor from related private_adaptive_pool. </li>
<li class="listitem">
<pre class="literallayout"><a name="doxygen.boost_container_header_reference.classboost_1_1container_1_1private__adaptive__pool_1ae558bc4e8e236a7c4da132a0769c2bc4"></a><span class="special">~</span><span class="identifier">private_adaptive_pool</span><span class="special">(</span><span class="special">)</span> <span class="keyword">noexcept</span><span class="special">;</span></pre>Destructor. </li>
<li class="listitem">
<pre class="literallayout"><span class="identifier">size_type</span> <a name="doxygen.boost_container_header_reference.classboost_1_1container_1_1private__adaptive__pool_1a011ad574177edff8f82cfbdf92f5d485"></a><span class="identifier">max_size</span><span class="special">(</span><span class="special">)</span> <span class="keyword">const</span> <span class="keyword">noexcept</span><span class="special">;</span></pre>
<p>Returns the number of elements that could be allocated. Never throws </p>
</li>
<li class="listitem">
<pre class="literallayout"><span class="identifier">pointer</span> <a name="doxygen.boost_container_header_reference.classboost_1_1container_1_1private__adaptive__pool_1a645acf270eb9b9a9b570ead900925ca5"></a><span class="identifier">allocate</span><span class="special">(</span><span class="identifier">size_type</span> count<span class="special">,</span> <span class="keyword">const</span> <span class="keyword">void</span> <span class="special">*</span> <span class="special">=</span> <span class="number">0</span><span class="special">)</span><span class="special">;</span></pre>
<p>Allocate memory for an array of count elements. Throws bad_alloc if there is no enough memory </p>
</li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">void</span> <a name="doxygen.boost_container_header_reference.classboost_1_1container_1_1private__adaptive__pool_1aef249b33c5f820ce7df82bca042de3d5"></a><span class="identifier">deallocate</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">pointer</span> <span class="special">&amp;</span> ptr<span class="special">,</span> <span class="identifier">size_type</span> count<span class="special">)</span> <span class="keyword">noexcept</span><span class="special">;</span></pre>
<p>Deallocate allocated memory. Never throws </p>
</li>
<li class="listitem"><pre class="literallayout"><span class="identifier">pointer</span> <a name="doxygen.boost_container_header_reference.classboost_1_1container_1_1private__adaptive__pool_1ab01e1ccf20b16f39061ffb952274fc16"></a><span class="identifier">allocation_command</span><span class="special">(</span><span class="identifier">allocation_type</span> command<span class="special">,</span> <span class="identifier">size_type</span> limit_size<span class="special">,</span> 
                           <span class="identifier">size_type</span> <span class="special">&amp;</span> prefer_in_recvd_out_size<span class="special">,</span> 
                           <span class="identifier">pointer</span> <span class="special">&amp;</span> reuse<span class="special">)</span><span class="special">;</span></pre></li>
<li class="listitem">
<pre class="literallayout"><span class="identifier">size_type</span> <a name="doxygen.boost_container_header_reference.classboost_1_1container_1_1private__adaptive__pool_1a8c0d63fced73164ffe28aec9b9f235a0"></a><span class="identifier">size</span><span class="special">(</span><span class="identifier">pointer</span> p<span class="special">)</span> <span class="keyword">const</span> <span class="keyword">noexcept</span><span class="special">;</span></pre>
<p>Returns maximum the number of objects the previously allocated memory pointed by p can hold. </p>
</li>
<li class="listitem">
<pre class="literallayout"><span class="identifier">pointer</span> <a name="doxygen.boost_container_header_reference.classboost_1_1container_1_1private__adaptive__pool_1ac2fdc87d0a04244edaa07bb81b9136ac"></a><span class="identifier">allocate_one</span><span class="special">(</span><span class="special">)</span><span class="special">;</span></pre>
<p>Allocates just one object. Memory allocated with this function must be deallocated only with deallocate_one(). Throws bad_alloc if there is no enough memory </p>
</li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">void</span> <a name="doxygen.boost_container_header_reference.classboost_1_1container_1_1private__adaptive__pool_1a9a0fde27d6415c3b1311ceb4905da79a"></a><span class="identifier">allocate_individual</span><span class="special">(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">size_t</span> num_elements<span class="special">,</span> 
                         <span class="identifier">multiallocation_chain</span> <span class="special">&amp;</span> chain<span class="special">)</span><span class="special">;</span></pre>
<p>Allocates many elements of size == 1. Elements must be individually deallocated with deallocate_one() </p>
</li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">void</span> <a name="doxygen.boost_container_header_reference.classboost_1_1container_1_1private__adaptive__pool_1ab8c4ae6844d2b3e1d900e8777341d8af"></a><span class="identifier">deallocate_one</span><span class="special">(</span><span class="identifier">pointer</span> p<span class="special">)</span> <span class="keyword">noexcept</span><span class="special">;</span></pre>
<p>Deallocates memory previously allocated with allocate_one(). You should never use deallocate_one to deallocate memory allocated with other functions different from allocate_one(). Never throws </p>
</li>
<li class="listitem"><pre class="literallayout"><span class="keyword">void</span> <a name="doxygen.boost_container_header_reference.classboost_1_1container_1_1private__adaptive__pool_1a1e5dfb87b63b30d182f36d891d45e1ba"></a><span class="identifier">deallocate_individual</span><span class="special">(</span><span class="identifier">multiallocation_chain</span> <span class="special">&amp;</span> chain<span class="special">)</span> <span class="keyword">noexcept</span><span class="special">;</span></pre></li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">void</span> <a name="doxygen.boost_container_header_reference.classboost_1_1container_1_1private__adaptive__pool_1a2e6ea9fa7139b589ea8592fd75da5ae9"></a><span class="identifier">allocate_many</span><span class="special">(</span><span class="identifier">size_type</span> elem_size<span class="special">,</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">size_t</span> n_elements<span class="special">,</span> 
                   <span class="identifier">multiallocation_chain</span> <span class="special">&amp;</span> chain<span class="special">)</span><span class="special">;</span></pre>
<p>Allocates many elements of size elem_size. Elements must be individually deallocated with deallocate() </p>
</li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">void</span> <a name="doxygen.boost_container_header_reference.classboost_1_1container_1_1private__adaptive__pool_1ac5ff2a85d2580af4f96670b705074964"></a><span class="identifier">allocate_many</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">size_type</span> <span class="special">*</span> elem_sizes<span class="special">,</span> <span class="identifier">size_type</span> n_elements<span class="special">,</span> 
                   <span class="identifier">multiallocation_chain</span> <span class="special">&amp;</span> chain<span class="special">)</span><span class="special">;</span></pre>
<p>Allocates n_elements elements, each one of size elem_sizes[i] Elements must be individually deallocated with deallocate() </p>
</li>
<li class="listitem"><pre class="literallayout"><span class="keyword">void</span> <a name="doxygen.boost_container_header_reference.classboost_1_1container_1_1private__adaptive__pool_1a555d0a39f4fe7b7bf795c508de65deb4"></a><span class="identifier">deallocate_many</span><span class="special">(</span><span class="identifier">multiallocation_chain</span> <span class="special">&amp;</span> chain<span class="special">)</span> <span class="keyword">noexcept</span><span class="special">;</span></pre></li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">void</span> <a name="doxygen.boost_container_header_reference.classboost_1_1container_1_1private__adaptive__pool_1a2a4f5d4403607f2a1c6ac8b2e26f3197"></a><span class="identifier">deallocate_free_blocks</span><span class="special">(</span><span class="special">)</span> <span class="keyword">noexcept</span><span class="special">;</span></pre>Deallocates all free blocks of the pool. </li>
</ol></div>
</div>
<div class="refsect2">
<a name="id-1.3.8.14.2.4.4.4"></a><h3>
<a name="id6-bb"></a><code class="computeroutput">private_adaptive_pool</code> friend functions</h3>
<div class="orderedlist"><ol class="orderedlist" type="1">
<li class="listitem">
<pre class="literallayout"><span class="keyword">void</span> <a name="doxygen.boost_container_header_reference.classboost_1_1container_1_1private__adaptive__pool_1a9215face6877fc76816c8b3c3d3b3012"></a><span class="identifier">swap</span><span class="special">(</span><span class="identifier">private_adaptive_pool</span> <span class="special">&amp;</span><span class="special">,</span> <span class="identifier">private_adaptive_pool</span> <span class="special">&amp;</span><span class="special">)</span> <span class="keyword">noexcept</span><span class="special">;</span></pre>
<p>Swaps allocators. Does not throw. If each allocator is placed in a different memory segment, the result is undefined. </p>
</li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">bool</span> <a name="doxygen.boost_container_header_reference.classboost_1_1container_1_1private__adaptive__pool_1a1fa5c3a4c8f566fb23394ac36c09bd2c"></a><span class="keyword">operator</span><span class="special">==</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">private_adaptive_pool</span> <span class="special">&amp;</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">private_adaptive_pool</span> <span class="special">&amp;</span><span class="special">)</span> <span class="keyword">noexcept</span><span class="special">;</span></pre>
<p>An allocator always compares to true, as memory allocated with one instance can be deallocated by another instance </p>
</li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">bool</span> <a name="doxygen.boost_container_header_reference.classboost_1_1container_1_1private__adaptive__pool_1a00729c5c2d8f92aca68ec7c994f9298b"></a><span class="keyword">operator</span><span class="special">!=</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">private_adaptive_pool</span> <span class="special">&amp;</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">private_adaptive_pool</span> <span class="special">&amp;</span><span class="special">)</span> <span class="keyword">noexcept</span><span class="special">;</span></pre>
<p>An allocator always compares to false, as memory allocated with one instance can be deallocated by another instance </p>
</li>
</ol></div>
</div>
<div class="refsect2">
<a name="id-1.3.8.14.2.4.4.5"></a><h3>
<a name="id7-bb"></a><code class="computeroutput">private_adaptive_pool</code> private member functions</h3>
<div class="orderedlist"><ol class="orderedlist" type="1"><li class="listitem"><pre class="literallayout"><span class="identifier">pointer</span> <a name="doxygen.boost_container_header_reference.classboost_1_1container_1_1private__adaptive__pool_1afdcb1f05fce0d213f8604649537f6000"></a><span class="identifier">priv_allocation_command</span><span class="special">(</span><span class="identifier">allocation_type</span> command<span class="special">,</span> 
                                <span class="identifier">std</span><span class="special">::</span><span class="identifier">size_t</span> limit_size<span class="special">,</span> 
                                <span class="identifier">size_type</span> <span class="special">&amp;</span> prefer_in_recvd_out_size<span class="special">,</span> 
                                <span class="identifier">pointer</span> <span class="special">&amp;</span> reuse_ptr<span class="special">)</span><span class="special">;</span></pre></li></ol></div>
</div>
</div>
</div>
<div class="copyright-footer">Copyright © 2009-2018 Ion Gaztanaga<p>
        Distributed under the Boost Software License, Version 1.0. (See accompanying
        file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
      </p>
</div>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="structboost_1_1container_1_1adaptive__pool_1_1rebind.html"><img src="../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../../boost_container_header_reference.html#doxygen.boost_container_header_reference.adaptive__pool_8hpp"><img src="../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="structboost_1_1container_1_1private__adaptive__pool_1_1rebind.html"><img src="../../../../doc/src/images/next.png" alt="Next"></a>
</div>
</body>
</html>
